/* Enhanced timeline styles for multi-row display */
.timeline {
    height: 30px; /* Default height - will be adjusted dynamically */
    background: linear-gradient(to right, var(--background-dark), var(--background));
    position: relative;
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: height 0.3s ease;
}

.timeline-event {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at center, var(--primary-light), var(--primary));
    border-radius: 50%;
    transform: translateX(-10px);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background 0.3s ease, 
                box-shadow 0.3s ease;
    z-index: 2;
    box-shadow: 0 0 10px rgba(209, 48, 48, 0.5);
    border: 2px solid var(--background-dark);
}

.timeline-event:hover, .timeline-event.active {
    transform: translateX(-10px) scale(1.5);
    background: radial-gradient(circle at center, var(--accent), var(--primary-light));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    z-index: 10;
}

.timeline-event::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(209, 48, 48, 0.8);
    opacity: 0;
    animation: pulse 2s infinite;
}

.timeline-event.active::after {
    opacity: 1;
}

.timeline-year-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: var(--primary-dark);
    color: var(--text);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 20;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timeline-event:hover .timeline-year-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Timeline connector lines to show relationships */
.timeline-connector {
    position: absolute;
    height: 1px;
    background: var(--primary-transparent);
    z-index: 1;
    top: 10px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(209, 48, 48, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(209, 48, 48, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(209, 48, 48, 0);
    }
}